package bookManager.operation;

import bookManager.BookDao;

import java.util.Scanner;

public class DeleteOperation implements IOperation{
    @Override
    public void work() {

        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入要删除的图书序号: ");
        int bookId = scanner.nextInt();

        BookDao bookDao=new BookDao();
        boolean ret=bookDao.delete(bookId);
        if (ret) {
            System.out.println("删除成功！");
        }else {
            System.out.println("删除失败！");
        }
    }
}
